using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class GHICHUModel : ObjModel<GHICHU>, IModelConverter
	{

		#region Constructor

		public GHICHUModel()
			: base()
		{
		}

		public GHICHUModel(GHICHU obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _maghichu;

		private System.String _manguon;

		private System.String _tenghichu;

		private System.String _noidung;

		private System.DateTime? _ngaytao;

		private System.DateTime? _ngaychinhsua;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGHICHU
		{
			get
			{
				return _maghichu;
			}
			set
			{
				_maghichu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(100, ErrorMessage= "Value must be under 100 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String MANGUON
		{
			get
			{
				return _manguon;
			}
			set
			{
				_manguon = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(100, ErrorMessage= "Value must be under 100 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENGHICHU
		{
			get
			{
				return _tenghichu;
			}
			set
			{
				_tenghichu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(2000, ErrorMessage= "Value must be under 2000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String NOIDUNG
		{
			get
			{
				return _noidung;
			}
			set
			{
				_noidung = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.DateTime? NGAYTAO
		{
			get
			{
				return _ngaytao;
			}
			set
			{
				_ngaytao = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.DateTime? NGAYCHINHSUA
		{
			get
			{
				return _ngaychinhsua;
			}
			set
			{
				_ngaychinhsua = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(GHICHUModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<GHICHU>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override GHICHU ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator GHICHUModel(GHICHU obj)
		{
			return new GHICHUModel(obj);
		}
		public static implicit operator GHICHU(GHICHUModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
